﻿<?php	
#################################################
#author:jackzheng
#Last upate:2017/10/07
#################################################
header("Content-type: text/html; charset=utf-8");
include $_SERVER['DOCUMENT_ROOT']."/Mapi/library/curl.class.php";

$http_host =  "http://".$_SERVER['HTTP_HOST'];
$news_id = isset($_REQUEST['news_id'])?intval($_REQUEST['news_id']):0;

$curl = new curl($http_host);
$apiurl="/Mapi/?url=/home/get_news_info";
$parameter=array("news_id" =>$news_id,"get_type"=>'');

$result = $curl->post($apiurl,$parameter,true);
$res_data = $curl->object_array(json_decode($result));

$news = $res_data['response']['data'];
?>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="default">
    <meta name="format-detection" content="telphone=no, email=no">
    <link rel="stylesheet" href="css/common.css"/>
    <script src="js/resize.js"></script>
    <link rel="stylesheet" href="css/problems.css"/>
    <title>问题详情</title>
</head>
<body>
    <div class="layout">
        <div class="problem_detail">
            <div class="p_title_wrap">
                <h2 class="p_title"><?php echo $news['title']; ?></h2>
                <p class="time"><?php echo $news['addtime']; ?></p>
            </div>

            <div class="problems">
                <?php echo html_entity_decode($news['content']);?>
            </div>
            
        </div>
       
    </div>
</body>
</html>

